<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@taglib prefix="html" uri="http://struts.apache.org/tags-html"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="logic" uri="http://struts.apache.org/tags-logic"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>


<link href="style.css" rel="stylesheet" type="text/css" >

	<body class="body" >
	<logic:present name="auth" scope="session">
	
		<html:form action="/adminCity" method="POST">
				<table border='1' class="admincity">
					<tr align="center" style="font-weight: bold; ">
						<td width="50" ><bean:message key="label.id" /></td>
						<td width="150" ><bean:message key="label.city" /></td>
					</tr>
					<c:forEach var="citys" items="${citys}">
						<tr>		
							<td >
								<html:checkbox property="id_city" value="${citys.id_city}"></html:checkbox>
								 ${citys.id_city}
										</td>
							<td ><b> - ${citys.name_city} 
										</b></td>						
						</tr>
					</c:forEach>	
				</table>
						<html:submit property="Show"><bean:message key="button.show" /></html:submit>
						<html:submit property="Updat" onclick="return confirm('Update?')? true : false;"><bean:message key="button.updata" /></html:submit>
						<html:submit property="Delete" onclick="return confirm('Delete?')? true : false;"><bean:message key="button.delete" /></html:submit>
						</br>
						<html:text property="add_name_city"></html:text>
						<html:submit property="Add" onclick="return confirm('Add?')? true : false;"><bean:message key="button.add" /></html:submit>
		</html:form>
		<html:form action="/adminCity" method="POST">
			<table border='1' align="center" width="800">
				
				<c:forEach var="cityUp" items="${cityUp}">
					<tr>		
						<td >
							 ${cityUp.id_city}
						</td>
						<td> 
							<html:text property="name_city" value="${cityUp.name_city}"/>
						</td>						
					</tr>
				</c:forEach>	
			</table>
				<html:submit property="UpdateCity" onclick="return confirm('Update?')? true : false;"><bean:message key="button.updata" /></html:submit>		
		</html:form>		
		</logic:present>
	</body>
		